#include "MyTools.h"
#include <string>
#include <iostream>
#include <sstream>
#include <iomanip>

std::auto_ptr<MyTools> MyTools::mInstance;

MyTools::MyTools()
{
}

MyTools::~MyTools()
{
}

void MyTools::Log(std::string str)
{
    std::ostringstream out;
    out << str << std::endl;

    std::cout<<out.str();
}

void MyTools::Log(std::string filename,int line,std::string str)
{
    size_t found = filename.find_last_of("/\\");

    std::ostringstream left;
    left << filename.substr(found+1) << ":" << line;
    std::ostringstream out;
    out << std::left << std::setw(16) << left.str() << " - " << str << std::endl;

    std::cout<<out.str();

}



